package Work3;

public class fizzbuzz extends Thread{
	int num;
	public fizzbuzz(int num){
		this.num=num;
	}
	@Override
	public void run() {
		synchronized (FizzBuzzDemo.lock) {
				if(num%3==0&&num%5==0){
					System.out.print("fizzbuzz ");
				}else{
					FizzBuzzDemo.weakup=false;
					FizzBuzzDemo.lock.notify();
				}
		}
		
		
	}
}
